#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define ff first
#define ss second 
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int inf = 1 << 28;
const ldb pi = fabsl(atan2l(0.0, -1.0));
using namespace std;

vector <int > words;
string word;

int getType()
{
	int n = word.size();
	if (n >= 4 && word[n - 4] == 'l' && word[n - 3] == 'i' && word[n - 2] == 'o' && word[n - 1] == 's')
		return 0;
	if (n >= 5 && word[n - 5] == 'l' && word[n - 4] == 'i' && word[n - 3] == 'a' && word[n - 2] == 'l' && word[n - 1] == 'a')
		return 1;
	if (n >= 3 && word[n - 3] == 'e' && word[n - 2] == 't' && word[n - 1] == 'r')
		return 2;
	if (n >= 4 && word[n - 4] == 'e' && word[n - 3] == 't' && word[n - 2] == 'r' && word[n - 1] == 'a')
		return 3;
	if (n >= 6 && word[n - 6] == 'i' && word[n - 5] == 'n' && word[n - 4] == 'i' && word[n - 3] == 't' && word[n - 2] == 'i' && word[n - 1] == 's')
		return 4;
	if (n >= 6 && word[n - 6] == 'i' && word[n - 5] == 'n' && word[n - 4] == 'i' && word[n - 3] == 't' && word[n - 2] == 'e' && word[n - 1] == 's')
		return 5;
	return -1;
}


void load()
{
	char c;
	while ((c = getchar()) != EOF)
	{
		if (c >= 'a' && c <= 'z')
		{
			word += c;
		}
		else 
		{
			if (word.size())
			{
				int t = getType();
				if (t == -1)
				{
					printf("NO");
					exit(0);
				}
				words.pb(t);
			}
			word = "";
		}
	}
	if (word.size())
	{
		int t = getType();
		if (t == -1)
		{
			printf("NO");
			exit(0);
		}
		words.pb(t);
	}
}

void solve()
{
	if (words.size() == 1)
	{
		printf("YES");
		return;	
	}
	if (!words.size())
	{
		printf("NO");
		return;
	}
	int g = words[0] % 2;
	for (int i = 0; i < words.size(); i++)
	{
		if (words[i] % 2 != g)
		{
			printf("NO");
			return;
		}
	}
	int i;
	for (i = 0; i < words.size() && words[i] < 2; i++);
	if (i == words.size() || words[i] > 3) 
	{
		printf("NO");
		return;
	}
	i++;
	for (; i < words.size() && words[i] > 3; i++);
	if (i != words.size())
	{
		printf("NO");
		return;
   	}
   	printf("YES");
}

#define file "a"
int main()
{
	#ifndef ONLINE_JUDGE
		freopen(file".in", "rt", stdin);
		freopen(file".out", "wt", stdout);
	#endif
	load();
	solve();
	return 0;
}
